package com.etone.smartAudit.enums;

import lombok.Getter;

/**
 * @author 张任豪
 */

public enum WorkOrderState {

    NO_START(0,"未开始"),
    ON_RUNNING(1,"进行中"),
    END_OVER(2,"办结");

    @Getter
    private Integer value;
    @Getter
    private String remark;

    WorkOrderState(Integer value, String remark) {
        this.value = value;
        this.remark = remark;
    }

    public static WorkOrderState getInstance(Integer value){
        if (value == null){
            return null;
        }
        WorkOrderState[] values = WorkOrderState.values();
        for (WorkOrderState workOrderState : values) {
            if (workOrderState.value.equals(value)){
                return workOrderState;
            }
        }
        return null;
    }
}
